import { serve as request } from './service.js'
import store from '@/store'
//const SERVR_URL = process.env.VUE_APP_SERVE_URL
const SERVR_URL = store.state.qualifyQuery.siteUrl
//区域船舶扫测
// export const requeAreaShipCheck = (data) => {
//   return request.post(`${SERVR_URL}wirelessApp/areaShipCheck`, data, {
// 		timeout: 20000
// 	})
// }

//=====================================new==================


//注册
export const requeRegister = (data) => {
  return request.post(`${SERVR_URL}app/customer/register`, {
		...data,
		isToken: true
	})
}

// 登录
export const requelogin = (data) => {
  return request.post(`${SERVR_URL}app/customer/login`, {
		...data,
		isToken: true
	})
}

// 我的团队
export function getChildrenInfo (data) {
  return request({
    method: 'get',
    url: `${SERVR_URL}app/customer/getChildrenInfo`,
    params: data
  })
}

//获取银行卡 
export function getBankInfo (data) {
  return request({
    method: 'get',
    url: `${SERVR_URL}app/customer/bankInfo`,
    params: data
  })
}

//新增银行卡
export const getBindBankcard = (data) => {
  return request.post(`${SERVR_URL}app/customer/bindBankcard`, data)
}

//支付订单发起
export const requeSubmitPay = (data) => {
  return request.post(`${SERVR_URL}app/customer/pay/submitPay`, data)
}

//我的资产
export function getFinancialInfo (data) {
  return request({
    method: 'get',
    url: `${SERVR_URL}app/customer/getFinancialInfo`,
    params: data
  })
}

//提现 
export const withdrawApply = (data) => {
  return request.post(`${SERVR_URL}app/customer/withdrawApply`, data)
}

//提现记录 
export function withdrawApplyRecord (data) {
  return request({
    method: 'get',
    url: `${SERVR_URL}app/customer/withdrawApplyRecord`,
    params: data
  })
}